home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / docs / binutils / binutils.inf < prev    next >
Encoding:
GNU Info File  |  1994-12-17  |  50.8 KB  |  1,525 lines

  1. This is Info file binutils.info, produced by Makeinfo-1.55 from the
  2. input file ./binutils.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Binutils: (binutils).         The GNU binary utilities "ar", "objcopy",
  6.                 "objdump", "nm", "nlmconv", "size",
  7.                                 "strings", "strip", and "ranlib".
  8. END-INFO-DIR-ENTRY
  9.  
  10.    Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided also
  18. that the entire resulting derived work is distributed under the terms
  19. of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions.
  24.  
  25. 
  26. File: binutils.info,  Node: Top,  Next: ar,  Prev: (DIR),  Up: (DIR)
  27.  
  28. Introduction
  29. ************
  30.  
  31.    This brief manual contains preliminary documentation for the GNU
  32. binary utilities (collectively version 2.2):
  33.  
  34. * Menu:
  35.  
  36. * ar::                          Create, modify, and extract from archives
  37. * nm::                          List symbols from object files
  38. * objcopy::            Copy and translate object files
  39. * objdump::                     Display information from object files
  40. * ranlib::                      Generate index to archive contents
  41. * size::                        List section sizes and total size
  42. * strings::                     List printable strings from files
  43. * strip::                       Discard symbols
  44. * c++filt::            Filter to demangle encoded C++ symbols
  45. * nlmconv::                     Converts object code into an NLM
  46. * Selecting The Target System:: How these utilities determine the target.
  47. * Index::
  48.  
  49. 
  50. File: binutils.info,  Node: ar,  Next: nm,  Prev: Top,  Up: Top
  51.  
  52. ar
  53. **
  54.  
  55.      ar [-]P[MOD [RELPOS]] ARCHIVE [MEMBER...]
  56.      ar -M [ <mri-script ]
  57.  
  58.    The GNU `ar' program creates, modifies, and extracts from archives.
  59. An "archive" is a single file holding a collection of other files in a
  60. structure that makes it possible to retrieve the original individual
  61. files (called "members" of the archive).
  62.  
  63.    The original files' contents, mode (permissions), timestamp, owner,
  64. and group are preserved in the archive, and can be restored on
  65. extraction.
  66.  
  67.    GNU `ar' can maintain archives whose members have names of any
  68. length; however, depending on how `ar' is configured on your system, a
  69. limit on member-name length may be imposed for compatibility with
  70. archive formats maintained with other tools.  If it exists, the limit
  71. is often 15 characters (typical of formats related to a.out) or 16
  72. characters (typical of formats related to coff).
  73.  
  74.    `ar' is considered a binary utility because archives of this sort
  75. are most often used as "libraries" holding commonly needed subroutines.
  76.  
  77.    `ar' creates an index to the symbols defined in relocatable object
  78. modules in the archive when you specify the modifier `s'.  Once
  79. created, this index is updated in the archive whenever `ar' makes a
  80. change to its contents (save for the `q' update operation).  An archive
  81. with such an index speeds up linking to the library, and allows
  82. routines in the library to call each other without regard to their
  83. placement in the archive.
  84.  
  85.    You may use `nm -s' or `nm --print-armap' to list this index table.
  86. If an archive lacks the table, another form of `ar' called `ranlib' can
  87. be used to add just the table.
  88.  
  89.    GNU `ar' is designed to be compatible with two different facilities.
  90. You can control its activity using command-line options, like the
  91. different varieties of `ar' on Unix systems; or, if you specify the
  92. single command-line option `-M', you can control it with a script
  93. supplied via standard input, like the MRI "librarian" program.
  94.  
  95. * Menu:
  96.  
  97. * ar cmdline::                  Controlling `ar' on the command line
  98. * ar scripts::                  Controlling `ar' with a script
  99.  
  100. 
  101. File: binutils.info,  Node: ar cmdline,  Next: ar scripts,  Up: ar
  102.  
  103. Controlling `ar' on the command line
  104. ====================================
  105.  
  106.      ar [-]P[MOD [RELPOS]] ARCHIVE [MEMBER...]
  107.  
  108.    When you use `ar' in the Unix style, `ar' insists on at least two
  109. arguments to execute: one keyletter specifying the *operation*
  110. (optionally accompanied by other keyletters specifying *modifiers*),
  111. and the archive name to act on.
  112.  
  113.    Most operations can also accept further MEMBER arguments, specifying
  114. particular files to operate on.
  115.  
  116.    GNU `ar' allows you to mix the operation code P and modifier flags
  117. MOD in any order, within the first command-line argument.
  118.  
  119.    If you wish, you may begin the first command-line argument with a
  120. dash.
  121.  
  122.    The P keyletter specifies what operation to execute; it may be any
  123. of the following, but you must specify only one of them:
  124.  
  125. `d'
  126.      *Delete* modules from the archive.  Specify the names of modules to
  127.      be deleted as MEMBER...; the archive is untouched if you specify
  128.      no files to delete.
  129.  
  130.      If you specify the `v' modifier, `ar' lists each module as it is
  131.      deleted.
  132.  
  133. `m'
  134.      Use this operation to *move* members in an archive.
  135.  
  136.      The ordering of members in an archive can make a difference in how
  137.      programs are linked using the library, if a symbol is defined in
  138.      more than one member.
  139.  
  140.      If no modifiers are used with `m', any members you name in the
  141.      MEMBER arguments are moved to the *end* of the archive; you can
  142.      use the `a', `b', or `i' modifiers to move them to a specified
  143.      place instead.
  144.  
  145. `p'
  146.      *Print* the specified members of the archive, to the standard
  147.      output file.  If the `v' modifier is specified, show the member
  148.      name before copying its contents to standard output.
  149.  
  150.      If you specify no MEMBER arguments, all the files in the archive
  151.      are printed.
  152.  
  153. `q'
  154.      *Quick append*; add the files MEMBER... to the end of ARCHIVE,
  155.      without checking for replacement.
  156.  
  157.      The modifiers `a', `b', and `i' do *not* affect this operation;
  158.      new members are always placed at the end of the archive.
  159.  
  160.      The modifier `v' makes `ar' list each file as it is appended.
  161.  
  162.      Since the point of this operation is speed, the archive's symbol
  163.      table index is not updated, even if it already existed; you can
  164.      use `ar s' or `ranlib' explicitly to update the symbol table index.
  165.  
  166. `r'
  167.      Insert the files MEMBER... into ARCHIVE (with *replacement*). This
  168.      operation differs from `q' in that any previously existing members
  169.      are deleted if their names match those being added.
  170.  
  171.      If one of the files named in MEMBER... does not exist, `ar'
  172.      displays an error message, and leaves undisturbed any existing
  173.      members of the archive matching that name.
  174.  
  175.      By default, new members are added at the end of the file; but you
  176.      may use one of the modifiers `a', `b', or `i' to request placement
  177.      relative to some existing member.
  178.  
  179.      The modifier `v' used with this operation elicits a line of output
  180.      for each file inserted, along with one of the letters `a' or `r'
  181.      to indicate whether the file was appended (no old member deleted)
  182.      or replaced.
  183.  
  184. `t'
  185.      Display a *table* listing the contents of ARCHIVE, or those of the
  186.      files listed in MEMBER... that are present in the archive.
  187.      Normally only the member name is shown; if you also want to see
  188.      the modes (permissions), timestamp, owner, group, and size, you can
  189.      request that by also specifying the `v' modifier.
  190.  
  191.      If you do not specify a MEMBER, all files in the archive are
  192.      listed.
  193.  
  194.      If there is more than one file with the same name (say, `fie') in
  195.      an archive (say `b.a'), `ar t b.a fie' lists only the first
  196.      instance; to see them all, you must ask for a complete listing--in
  197.      our example, `ar t b.a'.
  198.  
  199. `x'
  200.      *Extract* members (named MEMBER) from the archive.  You can use
  201.      the `v' modifier with this operation, to request that `ar' list
  202.      each name as it extracts it.
  203.  
  204.      If you do not specify a MEMBER, all files in the archive are
  205.      extracted.
  206.  
  207.    A number of modifiers (MOD) may immediately follow the P keyletter,
  208. to specify variations on an operation's behavior:
  209.  
  210. `a'
  211.      Add new files *after* an existing member of the archive.  If you
  212.      use the modifier `a', the name of an existing archive member must
  213.      be present as the RELPOS argument, before the ARCHIVE
  214.      specification.
  215.  
  216. `b'
  217.      Add new files *before* an existing member of the archive.  If you
  218.      use the modifier `b', the name of an existing archive member must
  219.      be present as the RELPOS argument, before the ARCHIVE
  220.      specification.  (same as `i').
  221.  
  222. `c'
  223.      *Create* the archive.  The specified ARCHIVE is always created if
  224.      it did not exist, when you request an update.  But a warning is
  225.      issued unless you specify in advance that you expect to create it,
  226.      by using this modifier.
  227.  
  228. `i'
  229.      Insert new files *before* an existing member of the archive.  If
  230.      you use the modifier `i', the name of an existing archive member
  231.      must be present as the RELPOS argument, before the ARCHIVE
  232.      specification.  (same as `b').
  233.  
  234. `l'
  235.      This modifier is accepted but not used.
  236.  
  237. `o'
  238.      Preserve the *original* dates of members when extracting them.  If
  239.      you do not specify this modifier, files extracted from the archive
  240.      are stamped with the time of extraction.
  241.  
  242. `s'
  243.      Write an object-file index into the archive, or update an existing
  244.      one, even if no other change is made to the archive.  You may use
  245.      this modifier flag either with any operation, or alone.  Running
  246.      `ar s' on an archive is equivalent to running `ranlib' on it.
  247.  
  248. `u'
  249.      Normally, `ar r'... inserts all files listed into the archive.  If
  250.      you would like to insert *only* those of the files you list that
  251.      are newer than existing members of the same names, use this
  252.      modifier.  The `u' modifier is allowed only for the operation `r'
  253.      (replace).  In particular, the combination `qu' is not allowed,
  254.      since checking the timestamps would lose any speed advantage from
  255.      the operation `q'.
  256.  
  257. `v'
  258.      This modifier requests the *verbose* version of an operation.  Many
  259.      operations display additional information, such as filenames
  260.      processed, when the modifier `v' is appended.
  261.  
  262. `V'
  263.      This modifier shows the version number of `ar'.
  264.  
  265. 
  266. File: binutils.info,  Node: ar scripts,  Prev: ar cmdline,  Up: ar
  267.  
  268. Controlling `ar' with a script
  269. ==============================
  270.  
  271.      ar -M [ <SCRIPT ]
  272.  
  273.    If you use the single command-line option `-M' with `ar', you can
  274. control its operation with a rudimentary command language.  This form
  275. of `ar' operates interactively if standard input is coming directly
  276. from a terminal.  During interactive use, `ar' prompts for input (the
  277. prompt is `AR >'), and continues executing even after errors.  If you
  278. redirect standard input to a script file, no prompts are issued, and
  279. `ar' abandons execution (with a nonzero exit code) on any error.
  280.  
  281.    The `ar' command language is *not* designed to be equivalent to the
  282. command-line options; in fact, it provides somewhat less control over
  283. archives.  The only purpose of the command language is to ease the
  284. transition to GNU `ar' for developers who already have scripts written
  285. for the MRI "librarian" program.
  286.  
  287.    The syntax for the `ar' command language is straightforward:
  288.    * commands are recognized in upper or lower case; for example, `LIST'
  289.      is the same as `list'.  In the following descriptions, commands are
  290.      shown in upper case for clarity.
  291.  
  292.    * a single command may appear on each line; it is the first word on
  293.      the line.
  294.  
  295.    * empty lines are allowed, and have no effect.
  296.  
  297.    * comments are allowed; text after either of the characters `*' or
  298.      `;' is ignored.
  299.  
  300.    * Whenever you use a list of names as part of the argument to an `ar'
  301.      command, you can separate the individual names with either commas
  302.      or blanks.  Commas are shown in the explanations below, for
  303.      clarity.
  304.  
  305.    * `+' is used as a line continuation character; if `+' appears at
  306.      the end of a line, the text on the following line is considered
  307.      part of the current command.
  308.  
  309.    Here are the commands you can use in `ar' scripts, or when using
  310. `ar' interactively.  Three of them have special significance:
  311.  
  312.    `OPEN' or `CREATE' specify a "current archive", which is a temporary
  313. file required for most of the other commands.
  314.  
  315.    `SAVE' commits the changes so far specified by the script.  Prior to
  316. `SAVE', commands affect only the temporary copy of the current archive.
  317.  
  318. `ADDLIB ARCHIVE'
  319. `ADDLIB ARCHIVE (MODULE, MODULE, ... MODULE)'
  320.      Add all the contents of ARCHIVE (or, if specified, each named
  321.      MODULE from ARCHIVE) to the current archive.
  322.  
  323.      Requires prior use of `OPEN' or `CREATE'.
  324.  
  325. `ADDMOD MEMBER, MEMBER, ... MEMBER'
  326.      Add each named MEMBER as a module in the current archive.
  327.  
  328.      Requires prior use of `OPEN' or `CREATE'.
  329.  
  330. `CLEAR'
  331.      Discard the contents of the current archive, cancelling the effect
  332.      of any operations since the last `SAVE'.  May be executed (with no
  333.      effect) even if  no current archive is specified.
  334.  
  335. `CREATE ARCHIVE'
  336.      Creates an archive, and makes it the current archive (required for
  337.      many other commands).  The new archive is created with a temporary
  338.      name; it is not actually saved as ARCHIVE until you use `SAVE'.
  339.      You can overwrite existing archives; similarly, the contents of any
  340.      existing file named ARCHIVE will not be destroyed until `SAVE'.
  341.  
  342. `DELETE MODULE, MODULE, ... MODULE'
  343.      Delete each listed MODULE from the current archive; equivalent to
  344.      `ar -d ARCHIVE MODULE ... MODULE'.
  345.  
  346.      Requires prior use of `OPEN' or `CREATE'.
  347.  
  348. `DIRECTORY ARCHIVE (MODULE, ... MODULE)'
  349. `DIRECTORY ARCHIVE (MODULE, ... MODULE) OUTPUTFILE'
  350.      List each named MODULE present in ARCHIVE.  The separate command
  351.      `VERBOSE' specifies the form of the output: when verbose output is
  352.      off, output is like that of `ar -t ARCHIVE MODULE...'.  When
  353.      verbose output is on, the listing is like `ar -tv ARCHIVE
  354.      MODULE...'.
  355.  
  356.      Output normally goes to the standard output stream; however, if you
  357.      specify OUTPUTFILE as a final argument, `ar' directs the output to
  358.      that file.
  359.  
  360. `END'
  361.      Exit from `ar', with a `0' exit code to indicate successful
  362.      completion.  This command does not save the output file; if you
  363.      have changed the current archive since the last `SAVE' command,
  364.      those changes are lost.
  365.  
  366. `EXTRACT MODULE, MODULE, ... MODULE'
  367.      Extract each named MODULE from the current archive, writing them
  368.      into the current directory as separate files.  Equivalent to `ar -x
  369.      ARCHIVE MODULE...'.
  370.  
  371.      Requires prior use of `OPEN' or `CREATE'.
  372.  
  373. `LIST'
  374.      Display full contents of the current archive, in "verbose" style
  375.      regardless of the state of `VERBOSE'.  The effect is like `ar tv
  376.      ARCHIVE').  (This single command is a GNU `ld' enhancement, rather
  377.      than present for MRI compatibility.)
  378.  
  379.      Requires prior use of `OPEN' or `CREATE'.
  380.  
  381. `OPEN ARCHIVE'
  382.      Opens an existing archive for use as the current archive (required
  383.      for many other commands).  Any changes as the result of subsequent
  384.      commands will not actually affect ARCHIVE until you next use
  385.      `SAVE'.
  386.  
  387. `REPLACE MODULE, MODULE, ... MODULE'
  388.      In the current archive, replace each existing MODULE (named in the
  389.      `REPLACE' arguments) from files in the current working directory.
  390.      To execute this command without errors, both the file, and the
  391.      module in the current archive, must exist.
  392.  
  393.      Requires prior use of `OPEN' or `CREATE'.
  394.  
  395. `VERBOSE'
  396.      Toggle an internal flag governing the output from `DIRECTORY'.
  397.      When the flag is on, `DIRECTORY' output matches output from `ar
  398.      -tv '....
  399.  
  400. `SAVE'
  401.      Commit your changes to the current archive, and actually save it
  402.      as a file with the name specified in the last `CREATE' or `OPEN'
  403.      command.
  404.  
  405.      Requires prior use of `OPEN' or `CREATE'.
  406.  
  407. 
  408. File: binutils.info,  Node: nm,  Next: objcopy,  Prev: ar,  Up: Top
  409.  
  410. nm
  411. **
  412.  
  413.      nm [ -a | --debug-syms ]  [ -g | --extern-only ]
  414.         [ -B ]  [ -C | --demangle ] [ -D | --dynamic ]
  415.         [ -s | --print-armap ]  [ -A | -o | --print-file-name ]
  416.         [ -n | -v | --numeric-sort ]  [ -p | --no-sort ]
  417.         [ -r | --reverse-sort ]  [ --size-sort ] [ -u | --undefined-only ]
  418.         [ -t RADIX | --radix=RADIX ] [ -P | --portability ]
  419.         [ --target=BFDNAME ] [ -f FORMAT | --format=FORMAT ]
  420.         [ --no-demangle ] [ -V | --version ]  [ --help ]  [ OBJFILE... ]
  421.  
  422.    GNU `nm' lists the symbols from object files OBJFILE....  If no
  423. object files are listed as arguments, `nm' assumes `a.out'.
  424.  
  425.    For each symbol, `nm' shows:
  426.  
  427.    * The symbol value, in the radix selected by options (see below), or
  428.      hexadecimal by default.
  429.  
  430.    * The symbol type.  At least the following types are used; others
  431.      are, as well, depending on the object file format.  If lowercase,
  432.      the symbol is local; if uppercase, the symbol is global (external).
  433.  
  434.     `A'
  435.           Absolute.
  436.  
  437.     `B'
  438.           BSS (uninitialized data).
  439.  
  440.     `C'
  441.           Common.
  442.  
  443.     `D'
  444.           Initialized data.
  445.  
  446.     `I'
  447.           Indirect reference.
  448.  
  449.     `T'
  450.           Text (program code).
  451.  
  452.     `U'
  453.           Undefined.
  454.  
  455.    * The symbol name.
  456.  
  457.    The long and short forms of options, shown here as alternatives, are
  458. equivalent.
  459.  
  460. `-A'
  461. `-o'
  462. `--print-file-name'
  463.      Precede each symbol by the name of the input file (or archive
  464.      element) in which it was found, rather than identifying the input
  465.      file once only, before all of its symbols.
  466.  
  467. `-a'
  468. `--debug-syms'
  469.      Display all symbols, even debugger-only symbols; normally these
  470.      are not listed.
  471.  
  472. `-B'
  473.      The same as `--format=bsd' (for compatibility with the MIPS `nm').
  474.  
  475. `-C'
  476. `--demangle'
  477.      Decode ("demangle") low-level symbol names into user-level names.
  478.      Besides removing any initial underscore prepended by the system,
  479.      this makes C++ function names readable.  *Note c++filt::, for more
  480.      information on demangling.
  481.  
  482. `--no-demangle'
  483.      Do not demangle low-level symbol names.  This is the default.
  484.  
  485. `-D'
  486. `--dynamic'
  487.      Display the dynamic symbols rather than the normal symbols.  This
  488.      is only meaningful for dynamic objects, such as certain types of
  489.      shared libraries.
  490.  
  491. `-f FORMAT'
  492. `--format=FORMAT'
  493.      Use the output format FORMAT, which can be `bsd', `sysv', or
  494.      `posix'.  The default is `bsd'.  Only the first character of
  495.      FORMAT is significant; it can be either upper or lower case.
  496.  
  497. `-g'
  498. `--extern-only'
  499.      Display only external symbols.
  500.  
  501. `-n'
  502. `-v'
  503. `--numeric-sort'
  504.      Sort symbols numerically by their addresses, rather than
  505.      alphabetically by their names.
  506.  
  507. `-p'
  508. `--no-sort'
  509.      Do not bother to sort the symbols in any order; print them in the
  510.      order encountered.
  511.  
  512. `-P'
  513. `--portability'
  514.      Use the POSIX.2 standard output format instead of the default
  515.      format.  Equivalent to `-f posix'.
  516.  
  517. `-s'
  518. `--print-armap'
  519.      When listing symbols from archive members, include the index: a
  520.      mapping (stored in the archive by `ar' or `ranlib') of which
  521.      modules contain definitions for which names.
  522.  
  523. `-r'
  524. `--reverse-sort'
  525.      Reverse the order of the sort (whether numeric or alphabetic); let
  526.      the last come first.
  527.  
  528. `--size-sort'
  529.      Sort symbols by size.  The size is computed as the difference
  530.      between the value of the symbol and the value of the symbol with
  531.      the next higher value.  The size of the symbol is printed, rather
  532.      than the value.
  533.  
  534. `-t RADIX'
  535. `--radix=RADIX'
  536.      Use RADIX as the radix for printing the symbol values.  It must be
  537.      `d' for decimal, `o' for octal, or `x' for hexadecimal.
  538.  
  539. `--target=BFDNAME'
  540.      Specify an object code format other than your system's default
  541.      format.  *Note Target Selection::, for more information.
  542.  
  543. `-u'
  544. `--undefined-only'
  545.      Display only undefined symbols (those external to each object
  546.      file).
  547.  
  548. `-V'
  549. `--version'
  550.      Show the version number of `nm' and exit.
  551.  
  552. `--help'
  553.      Show a summary of the options to `nm' and exit.
  554.  
  555. 
  556. File: binutils.info,  Node: objcopy,  Next: objdump,  Prev: nm,  Up: Top
  557.  
  558. objcopy
  559. *******
  560.  
  561.      objcopy [ -F BFDNAME | --target=BFDNAME ]
  562.              [ -I BFDNAME | --input-target=BFDNAME ]
  563.              [ -O BFDNAME | --output-target=BFDNAME ]
  564.              [ -S | --strip-all ]  [ -g | --strip-debug ]
  565.              [ -x | --discard-all ]  [ -X | --discard-locals ]
  566.              [ -b BYTE | --byte=BYTE ]
  567.              [ -i INTERLEAVE | --interleave=INTERLEAVE ]
  568.              [ -R SECTIONNAME | --remove-section=SECTIONNAME ]
  569.              [ -v | --verbose ] [ -V | --version ]  [ --help ]
  570.              INFILE [OUTFILE]
  571.  
  572.    The GNU `objcopy' utility copies the contents of an object file to
  573. another.  `objcopy' uses the GNU BFD Library to read and write the
  574. object files.  It can write the destination object file in a format
  575. different from that of the source object file.  The exact behavior of
  576. `objcopy' is controlled by command-line options.
  577.  
  578.    `objcopy' creates temporary files to do its translations and deletes
  579. them afterward.  `objcopy' uses BFD to do all its translation work; it
  580. has access to all the formats described in BFD and thus is able to
  581. recognize most formats without being told explicitly.  *Note BFD:
  582. (ld.info)BFD.
  583.  
  584. `INFILE'
  585. `OUTFILE'
  586.      The source and output files, respectively.  If you do not specify
  587.      OUTFILE, `objcopy' creates a temporary file and destructively
  588.      renames the result with the name of INFILE.
  589.  
  590. `-I BFDNAME'
  591. `--input-target=BFDNAME'
  592.      Consider the source file's object format to be BFDNAME, rather than
  593.      attempting to deduce it.  *Note Target Selection::, for more
  594.      information.
  595.  
  596. `-O BFDNAME'
  597. `--output-target=BFDNAME'
  598.      Write the output file using the object format BFDNAME.  *Note
  599.      Target Selection::, for more information.
  600.  
  601. `-F BFDNAME'
  602. `--target=BFDNAME'
  603.      Use BFDNAME as the object format for both the input and the output
  604.      file; i.e., simply transfer data from source to destination with no
  605.      translation.  *Note Target Selection::, for more information.
  606.  
  607. `-R SECTIONNAME'
  608. `--remove-section=SECTIONNAME'
  609.      Remove any section named SECTIONNAME from the output file.  This
  610.      option may be given more than once.  Note that using this option
  611.      inappropriately may make the output file unusable.
  612.  
  613. `-S'
  614. `--strip-all'
  615.      Do not copy relocation and symbol information from the source file.
  616.  
  617. `-g'
  618. `--strip-debug'
  619.      Do not copy debugging symbols from the source file.
  620.  
  621. `-x'
  622. `--discard-all'
  623.      Do not copy non-global symbols from the source file.
  624.  
  625. `-X'
  626. `--discard-locals'
  627.      Do not copy compiler-generated local symbols.  (These usually
  628.      start with `L' or `.'.)
  629.  
  630. `-b BYTE'
  631. `--byte=BYTE'
  632.      Keep only every BYTEth byte of the input file (header data is not
  633.      affected).  BYTE can be in the range from 0 to INTERLEAVE-1, where
  634.      INTERLEAVE is given by the `-i' or `--interleave' option, or the
  635.      default of 4.  This option is useful for creating files to program
  636.      ROM.  It is typically used with an `srec' output target.
  637.  
  638. `-i INTERLEAVE'
  639. `--interleave=INTERLEAVE'
  640.      Only copy one out of every INTERLEAVE bytes.  Select which byte to
  641.      copy with the -B or `--byte' option.  The default is 4.  `objcopy'
  642.      ignores this option if you do not specify either `-b' or `--byte'.
  643.  
  644. `-V'
  645. `--version'
  646.      Show the version number of `objcopy'.
  647.  
  648. `-v'
  649. `--verbose'
  650.      Verbose output: list all object files modified.  In the case of
  651.      archives, `objcopy -V' lists all members of the archive.
  652.  
  653. `--help'
  654.      Show a summary of the options to `objcopy'.
  655.  
  656. 
  657. File: binutils.info,  Node: objdump,  Next: ranlib,  Prev: objcopy,  Up: Top
  658.  
  659. objdump
  660. *******
  661.  
  662.      objdump [ -a | --archive-headers ]
  663.              [ -b BFDNAME | --target=BFDNAME ]
  664.              [ -d | --disassemble ]  [ -D | --disassemble-all ]
  665.              [ -f | --file-headers ]
  666.              [ -h | --section-headers | --headers ]  [ -i | --info ]
  667.              [ -j SECTION | --section=SECTION ]
  668.              [ -l | --line-numbers ]
  669.              [ -m MACHINE | --architecture=MACHINE ]
  670.              [ -r | --reloc ] [ -R | --dynamic-reloc ]
  671.              [ -s | --full-contents ]  [ --stabs ]
  672.              [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
  673.              [ --version ]  [ --help ] OBJFILE...
  674.  
  675.    `objdump' displays information about one or more object files.  The
  676. options control what particular information to display.  This
  677. information is mostly useful to programmers who are working on the
  678. compilation tools, as opposed to programmers who just want their
  679. program to compile and work.
  680.  
  681.    OBJFILE... are the object files to be examined.  When you specify
  682. archives, `objdump' shows information on each of the member object
  683. files.
  684.  
  685.    The long and short forms of options, shown here as alternatives, are
  686. equivalent.  At least one option besides `-l' must be given.
  687.  
  688. `-a'
  689. `--archive-header'
  690.      If any of the OBJFILE files are archives, display the archive
  691.      header information (in a format similar to `ls -l').  Besides the
  692.      information you could list with `ar tv', `objdump -a' shows the
  693.      object file format of each archive member.
  694.  
  695. `-b BFDNAME'
  696. `--target=BFDNAME'
  697.      Specify that the object-code format for the object files is
  698.      BFDNAME.  This option may not be necessary; OBJDUMP can
  699.      automatically recognize many formats.
  700.  
  701.      For example,
  702.           objdump -b oasys -m vax -h fu.o
  703.  
  704.      displays summary information from the section headers (`-h') of
  705.      `fu.o', which is explicitly identified (`-m') as a VAX object file
  706.      in the format produced by Oasys compilers.  You can list the
  707.      formats available with the `-i' option.  *Note Target Selection::,
  708.      for more information.
  709.  
  710. `-d'
  711. `--disassemble'
  712.      Display the assembler mnemonics for the machine instructions from
  713.      OBJFILE.  This option only disassembles those sections which are
  714.      expected to contain instructions.
  715.  
  716. `-D'
  717. `--disassemble-all'
  718.      Like `-d', but disassemble the contents of all sections, not just
  719.      those expected to contain instructions.
  720.  
  721. `-f'
  722. `--file-header'
  723.      Display summary information from the overall header of each of the
  724.      OBJFILE files.
  725.  
  726. `-h'
  727. `--section-header'
  728. `--header'
  729.      Display summary information from the section headers of the object
  730.      file.
  731.  
  732.      File segments may be relocated to nonstandard addresses, for
  733.      example by using the `-Ttext', `-Tdata', or `-Tbss' options to
  734.      `ld'.  However, some object file formats, such as a.out, do not
  735.      store the starting address of the file segments.  In those
  736.      situations, although `ld' relocates the sections correctly, using
  737.      `objdump -h' to list the file section headers cannot show the
  738.      correct addresses.  Instead, it shows the usual addresses, which
  739.      are implicit for the target.
  740.  
  741. `--help'
  742.      Print a summary of the options to `objdump' and exit.
  743.  
  744. `-i'
  745. `--info'
  746.      Display a list showing all architectures and object formats
  747.      available for specification with `-b' or `-m'.
  748.  
  749. `-j NAME'
  750. `--section=NAME'
  751.      Display information only for section NAME.
  752.  
  753. `-l'
  754. `--line-numbers'
  755.      Label the display (using debugging information) with the filename
  756.      and source line numbers corresponding to the object code shown.
  757.      Only useful with `-d' or `-D'.
  758.  
  759. `-m MACHINE'
  760. `--architecture=MACHINE'
  761.      Specify that the object files OBJFILE are for architecture
  762.      MACHINE.  You can list available architectures using the `-i'
  763.      option.
  764.  
  765. `-r'
  766. `--reloc'
  767.      Print the relocation entries of the file.  If used with `-d' or
  768.      `-D', the relocations are printed interspersed with the
  769.      disassembly.
  770.  
  771. `-R'
  772. `--dynamic-reloc'
  773.      Print the dynamic relocation entries of the file.  This is only
  774.      meaningful for dynamic objects, such as certain types of shared
  775.      libraries.
  776.  
  777. `-s'
  778. `--full-contents'
  779.      Display the full contents of any sections requested.
  780.  
  781. `--stabs'
  782.      Display the full contents of any sections requested.  Display the
  783.      contents of the .stab and .stab.index and .stab.excl sections from
  784.      an ELF file.  This is only useful on systems (such as Solaris 2.0)
  785.      in which `.stab' debugging symbol-table entries are carried in an
  786.      ELF section.  In most other file formats, debugging symbol-table
  787.      entries are interleaved with linkage symbols, and are visible in
  788.      the `--syms' output.
  789.  
  790. `-t'
  791. `--syms'
  792.      Print the symbol table entries of the file.  This is similar to
  793.      the information provided by the `nm' program.
  794.  
  795. `-T'
  796. `--dynamic-syms'
  797.      Print the dynamic symbol table entries of the file.  This is only
  798.      meaningful for dynamic objects, such as certain types of shared
  799.      libraries.  This is similar to the information provided by the `nm'
  800.      program when given the `-D' (`--dynamic') option.
  801.  
  802. `--version'
  803.      Print the version number of `objdump' and exit.
  804.  
  805. `-x'
  806. `--all-header'
  807.      Display all available header information, including the symbol
  808.      table and relocation entries.  Using `-x' is equivalent to
  809.      specifying all of `-a -f -h -r -t'.
  810.  
  811. 
  812. File: binutils.info,  Node: ranlib,  Next: size,  Prev: objdump,  Up: Top
  813.  
  814. ranlib
  815. ******
  816.  
  817.      ranlib [-vV] ARCHIVE
  818.  
  819.    `ranlib' generates an index to the contents of an archive and stores
  820. it in the archive.  The index lists each symbol defined by a member of
  821. an archive that is a relocatable object file.
  822.  
  823.    You may use `nm -s' or `nm --print-armap' to list this index.
  824.  
  825.    An archive with such an index speeds up linking to the library and
  826. allows routines in the library to call each other without regard to
  827. their placement in the archive.
  828.  
  829.    The GNU `ranlib' program is another form of GNU `ar'; running
  830. `ranlib' is completely equivalent to executing `ar -s'.  *Note ar::.
  831.  
  832. `-v'
  833. `-V'
  834.      Show the version number of `ranlib'.
  835.  
  836. 
  837. File: binutils.info,  Node: size,  Next: strings,  Prev: ranlib,  Up: Top
  838.  
  839. size
  840. ****
  841.  
  842.      size [ -A | -B | --format=COMPATIBILITY ]
  843.           [ --help ]  [ -d | -o | -x | --radix=NUMBER ]
  844.           [ --target=BFDNAME ]  [ -V | --version ]
  845.           OBJFILE...
  846.  
  847.    The GNU `size' utility lists the section sizes--and the total
  848. size--for each of the object or archive files OBJFILE in its argument
  849. list.  By default, one line of output is generated for each object file
  850. or each module in an archive.
  851.  
  852.    OBJFILE... are the object files to be examined.
  853.  
  854.    The command line options have the following meanings:
  855.  
  856. `-A'
  857. `-B'
  858. `--format=COMPATIBILITY'
  859.      Using one of these options, you can choose whether the output from
  860.      GNU `size' resembles output from System V `size' (using `-A', or
  861.      `--format=sysv'), or Berkeley `size' (using `-B', or
  862.      `--format=berkeley').  The default is the one-line format similar
  863.      to Berkeley's.
  864.  
  865.      Here is an example of the Berkeley (default) format of output from
  866.      `size':
  867.           size --format=Berkeley ranlib size
  868.           text    data    bss     dec     hex     filename
  869.           294880  81920   11592   388392  5ed28   ranlib
  870.           294880  81920   11888   388688  5ee50   size
  871.  
  872.      This is the same data, but displayed closer to System V
  873.      conventions:
  874.  
  875.           size --format=SysV ranlib size
  876.           ranlib  :
  877.           section         size         addr
  878.           .text         294880         8192
  879.           .data          81920       303104
  880.           .bss           11592       385024
  881.           Total         388392
  882.           
  883.           
  884.           size  :
  885.           section         size         addr
  886.           .text         294880         8192
  887.           .data          81920       303104
  888.           .bss           11888       385024
  889.           Total         388688
  890.  
  891. `--help'
  892.      Show a summary of acceptable arguments and options.
  893.  
  894. `-d'
  895. `-o'
  896. `-x'
  897. `--radix=NUMBER'
  898.      Using one of these options, you can control whether the size of
  899.      each section is given in decimal (`-d', or `--radix=10'); octal
  900.      (`-o', or `--radix=8'); or hexadecimal (`-x', or `--radix=16').
  901.      In `--radix=NUMBER', only the three values (8, 10, 16) are
  902.      supported.  The total size is always given in two radices; decimal
  903.      and hexadecimal for `-d' or `-x' output, or octal and hexadecimal
  904.      if you're using `-o'.
  905.  
  906. `--target=BFDNAME'
  907.      Specify that the object-code format for OBJFILE is BFDNAME.  This
  908.      option may not be necessary; `size' can automatically recognize
  909.      many formats.  *Note Target Selection::, for more information.
  910.  
  911. `-V'
  912. `--version'
  913.      Display the version number of `size'.
  914.  
  915. 
  916. File: binutils.info,  Node: strings,  Next: strip,  Prev: size,  Up: Top
  917.  
  918. strings
  919. *******
  920.  
  921.      strings [-afov] [-MIN-LEN] [-n MIN-LEN] [-t RADIX] [-]
  922.              [--all] [--print-file-name] [--bytes=MIN-LEN]
  923.              [--radix=RADIX] [--target=BFDNAME]
  924.              [--help] [--version] FILE...
  925.  
  926.    For each FILE given, GNU `strings' prints the printable character
  927. sequences that are at least 4 characters long (or the number given with
  928. the options below) and are followed by a NUL or newline character.  By
  929. default, it only prints the strings from the initialized data sections
  930. of object files; for other types of files, it prints the strings from
  931. the whole file.
  932.  
  933.    `strings' is mainly useful for determining the contents of non-text
  934. files.
  935.  
  936. `-a'
  937. `--all'
  938. `-'
  939.      Do not scan only the initialized data section of object files; scan
  940.      the whole files.
  941.  
  942. `-f'
  943. `--print-file-name'
  944.      Print the name of the file before each string.
  945.  
  946. `--help'
  947.      Print a summary of the program usage on the standard output and
  948.      exit.
  949.  
  950. `-MIN-LEN'
  951. `-n MIN-LEN'
  952. `--bytes=MIN-LEN'
  953.      Print sequences of characters that are at least MIN-LEN characters
  954.      long, instead of the default 4.
  955.  
  956. `-o'
  957.      Like `-t o'.  Some other versions of `strings' have `-o' act like
  958.      `-t d' instead.  Since we can not be compatible with both ways, we
  959.      simply chose one.
  960.  
  961. `-t RADIX'
  962. `--radix=RADIX'
  963.      Print the offset within the file before each string.  The single
  964.      character argument specifies the radix of the offset--`o' for
  965.      octal, `x' for hexadecimal, or `d' for decimal.
  966.  
  967. `--target=BFDNAME'
  968.      Specify an object code format other than your system's default
  969.      format.  *Note Target Selection::, for more information.
  970.  
  971. `-v'
  972. `--version'
  973.      Print the program version number on the standard output and exit.
  974.  
  975. 
  976. File: binutils.info,  Node: strip,  Next: c++filt,  Prev: strings,  Up: Top
  977.  
  978. strip
  979. *****
  980.  
  981.      strip [ -F BFDNAME | --target=BFDNAME | --target=BFDNAME ]
  982.            [ -I BFDNAME | --input-target=BFDNAME ]
  983.            [ -O BFDNAME | --output-target=BFDNAME ]
  984.            [ -s | --strip-all ] [ -S | -g | --strip-debug ]
  985.            [ -x | --discard-all ] [ -X | --discard-locals ]
  986.            [ -R SECTIONNAME | --remove-section=SECTIONNAME ]
  987.            [ -v | --verbose ]  [ -V | --version ]  [ --help ]
  988.            OBJFILE...
  989.  
  990.    GNU `strip' discards all symbols from object files OBJFILE.  The
  991. list of object files may include archives.  At least one object file
  992. must be given.
  993.  
  994.    `strip' modifies the files named in its argument, rather than
  995. writing modified copies under different names.
  996.  
  997. `-F BFDNAME'
  998. `--target=BFDNAME'
  999.      Treat the original OBJFILE as a file with the object code format
  1000.      BFDNAME, and rewrite it in the same format.  *Note Target
  1001.      Selection::, for more information.
  1002.  
  1003. `--help'
  1004.      Show a summary of the options to `strip' and exit.
  1005.  
  1006. `-I BFDNAME'
  1007. `--input-target=BFDNAME'
  1008.      Treat the original OBJFILE as a file with the object code format
  1009.      BFDNAME.  *Note Target Selection::, for more information.
  1010.  
  1011. `-O BFDNAME'
  1012. `--output-target=BFDNAME'
  1013.      Replace OBJFILE with a file in the output format BFDNAME.  *Note
  1014.      Target Selection::, for more information.
  1015.  
  1016. `-R SECTIONNAME'
  1017. `--remove-section=SECTIONNAME'
  1018.      Remove any section named SECTIONNAME from the output file.  This
  1019.      option may be given more than once.  Note that using this option
  1020.      inappropriately may make the output file unusable.
  1021.  
  1022. `-s'
  1023. `--strip-all'
  1024.      Remove all symbols.
  1025.  
  1026. `-g'
  1027. `-S'
  1028. `--strip-debug'
  1029.      Remove debugging symbols only.
  1030.  
  1031. `-x'
  1032. `--discard-all'
  1033.      Remove non-global symbols.
  1034.  
  1035. `-X'
  1036. `--discard-locals'
  1037.      Remove compiler-generated local symbols.  (These usually start
  1038.      with `L' or `.'.)
  1039.  
  1040. `-V'
  1041. `--version'
  1042.      Show the version number for `strip'.
  1043.  
  1044. `-v'
  1045. `--verbose'
  1046.      Verbose output: list all object files modified.  In the case of
  1047.      archives, `strip -v' lists all members of the archive.
  1048.  
  1049. 
  1050. File: binutils.info,  Node: c++filt,  Next: nlmconv,  Prev: strip,  Up: Top
  1051.  
  1052. c++filt
  1053. *******
  1054.  
  1055.      c++filt [ -_ | --strip-underscores ]
  1056.          [ -n | --no-strip-underscores ]
  1057.              [ -s FORMAT | --format=FORMAT ]
  1058.              [ --help ]  [ --version ]  [ SYMBOL... ]
  1059.  
  1060.    The C++ language provides function overloading, which means that you
  1061. can write many functions with the same name (providing each takes
  1062. parameters of different types).  All C++ function names are encoded
  1063. into a low-level assembly label (this process is known as "mangling").
  1064. The `c++filt' program does the inverse mapping: it decodes
  1065. ("demangles") low-level names into user-level names so that the linker
  1066. can keep these overloaded functions from clashing.
  1067.  
  1068.    Every alphanumeric word (consisting of letters, digits, underscores,
  1069. dollars, or periods) seen in the input is a potential label.  If the
  1070. label decodes into a C++ name, the C++ name replaces the low-level name
  1071. in the output.
  1072.  
  1073.    You can use `c++filt' to decipher individual symbols:
  1074.  
  1075.      c++filt SYMBOL
  1076.  
  1077.    If no SYMBOL arguments are given, `c++filt' reads symbol names from
  1078. the standard input and writes the demangled names to the standard
  1079. output.  All results are printed on the standard output.
  1080.  
  1081. `-_'
  1082. `--strip-underscores'
  1083.      On some systems, both the C and C++ compilers put an underscore in
  1084.      front of every name.  For example, the C name `foo' gets the
  1085.      low-level name `_foo'.  This option removes the initial
  1086.      underscore.  Whether `c++filt' removes the underscore by default
  1087.      is target dependent.
  1088.  
  1089. `-n'
  1090. `--no-strip-underscores'
  1091.      Do not remove the initial underscore.
  1092.  
  1093. `-s FORMAT'
  1094. `--format=FORMAT'
  1095.      GNU `nm' can decode three different methods of mangling, used by
  1096.      different C++ compilers.  The argument to this option selects which
  1097.      method it uses:
  1098.  
  1099.     `gnu'
  1100.           the one used by the GNU compiler (the default method)
  1101.  
  1102.     `lucid'
  1103.           the one used by the Lucid compiler
  1104.  
  1105.     `arm'
  1106.           the one specified by the C++ Annotated Reference Manual
  1107.  
  1108. `--help'
  1109.      Print a summary of the options to `c++filt' and exit.
  1110.  
  1111. `--version'
  1112.      Print the version number of `c++filt' and exit.
  1113.  
  1114.      *Warning:* `c++filt' is a new utility, and the details of its user
  1115.      interface are subject to change in future releases.  In particular,
  1116.      a command-line option may be required in the the future to decode
  1117.      a name passed as an argument on the command line; in other words,
  1118.  
  1119.           c++filt SYMBOL
  1120.  
  1121.      may in a future release become
  1122.  
  1123.           c++filt OPTION SYMBOL
  1124.  
  1125. 
  1126. File: binutils.info,  Node: nlmconv,  Next: Selecting The Target System,  Prev: c++filt,  Up: Top
  1127.  
  1128. nlmconv
  1129. *******
  1130.  
  1131.    `nlmconv' converts a relocatable object file into a NetWare Loadable
  1132. Module.
  1133.  
  1134.      *Warning:* `nlmconv' is not always built as part of the binary
  1135.      utilities, since it is only useful for NLM targets.
  1136.  
  1137.      nlmconv [ -I BFDNAME | --input-target=BFDNAME ]
  1138.              [ -O BFDNAME | --output-target=BFDNAME ]
  1139.              [ -T HEADERFILE | --header-file=HEADERFILE ]
  1140.              [ -d | --debug]  [ -l LINKER | --linker=LINKER ]
  1141.              [ -h | --help ]  [ -V | --version ]
  1142.              INFILE OUTFILE
  1143.  
  1144.    `nlmconv' converts the relocatable `i386' object file INFILE into
  1145. the NetWare Loadable Module OUTFILE, optionally reading HEADERFILE for
  1146. NLM header information.  For instructions on writing the NLM command
  1147. file language used in header files, see the `linkers' section,
  1148. `NLMLINK' in particular, of the `NLM Development and Tools Overview',
  1149. which is part of the NLM Software Developer's Kit ("NLM SDK"),
  1150. available from Novell, Inc.  `nlmconv' uses the GNU Binary File
  1151. Descriptor library to read INFILE; see *Note BFD: (ld.info)BFD, for
  1152. more information.
  1153.  
  1154.    `nlmconv' can perform a link step.  In other words, you can list
  1155. more than one object file for input if you list them in the definitions
  1156. file (rather than simply specifying one input file on the command line).
  1157. In this case, `nlmconv' calls the linker for you.
  1158.  
  1159. `-I BFDNAME'
  1160. `--input-target=BFDNAME'
  1161.      Object format of the input file.  `nlmconv' can usually determine
  1162.      the format of a given file (so no default is necessary).  *Note
  1163.      Target Selection::, for more information.
  1164.  
  1165. `-O BFDNAME'
  1166. `--output-target=BFDNAME'
  1167.      Object format of the output file.  `nlmconv' infers the output
  1168.      format based on the input format, e.g. for a `i386' input file the
  1169.      output format is `nlm32-i386'.  *Note Target Selection::, for more
  1170.      information.
  1171.  
  1172. `-T HEADERFILE'
  1173. `--header-file=HEADERFILE'
  1174.      Reads HEADERFILE for NLM header information.  For instructions on
  1175.      writing the NLM command file language used in header files, see
  1176.      see the `linkers' section, of the `NLM Development and Tools
  1177.      Overview', which is part of the NLM Software Developer's Kit,
  1178.      available from Novell, Inc.
  1179.  
  1180. `-d'
  1181. `--debug'
  1182.      Displays (on standard error) the linker command line used by
  1183.      `nlmconv'.
  1184.  
  1185. `-l LINKER'
  1186. `--linker=LINKER'
  1187.      Use LINKER for any linking.  LINKER can be an abosolute or a
  1188.      relative pathname.
  1189.  
  1190. `-h'
  1191. `--help'
  1192.      Prints a usage summary.
  1193.  
  1194. `-V'
  1195. `--version'
  1196.      Prints the version number for `nlmconv'.
  1197.  
  1198. 
  1199. File: binutils.info,  Node: Selecting The Target System,  Next: Index,  Prev: nlmconv,  Up: Top
  1200.  
  1201. Selecting the target system
  1202. ***************************
  1203.  
  1204.    You can specify three aspects of the target system to the GNU binary
  1205. file utilities, each in several ways:
  1206.  
  1207.    * the target
  1208.  
  1209.    * the architecture
  1210.  
  1211.    * the linker emulation (which applies to the linker only)
  1212.  
  1213.    In the following summaries, the lists of ways to specify values are
  1214. in order of decreasing precedence.  The ways listed first override those
  1215. listed later.
  1216.  
  1217.    The commands to list valid values only list the values for which the
  1218. programs you are running were configured.  If they were configured with
  1219. `--with-targets=all', the commands list most of the available values,
  1220. but a few are left out; not all targets can be configured in at once
  1221. because some of them can only be configured "native" (on hosts with the
  1222. same type as the target system).
  1223.  
  1224. * Menu:
  1225.  
  1226. * Target Selection::
  1227. * Architecture Selection::
  1228. * Linker Emulation Selection::
  1229.  
  1230. 
  1231. File: binutils.info,  Node: Target Selection,  Next: Architecture Selection,  Up: Selecting The Target System
  1232.  
  1233. Target Selection
  1234. ================
  1235.  
  1236.    A "target" is an object file format.  A given target may be
  1237. supported for multiple architectures (*note Architecture Selection::.).
  1238. A target selection may also have variations for different operating
  1239. systems or architectures.
  1240.  
  1241.    The command to list valid target values is `objdump -i' (the first
  1242. column of output contains the relevant information).
  1243.  
  1244.    Some sample values are: `a.out-hp300bsd', `ecoff-littlemips',
  1245. `a.out-sunos-big'.
  1246.  
  1247. `objdump' Target
  1248. ----------------
  1249.  
  1250.    Ways to specify:
  1251.  
  1252.   1. command line option: `-b' or `--target'
  1253.  
  1254.   2. environment variable `GNUTARGET'
  1255.  
  1256.   3. deduced from the input file
  1257.  
  1258. `objcopy' and `strip' Input Target
  1259. ----------------------------------
  1260.  
  1261.    Ways to specify:
  1262.  
  1263.   1. command line options: `-I' or `--input-target', or `-F' or
  1264.      `--target'
  1265.  
  1266.   2. environment variable `GNUTARGET'
  1267.  
  1268.   3. deduced from the input file
  1269.  
  1270. `objcopy' and `strip' Output Target
  1271. -----------------------------------
  1272.  
  1273.    Ways to specify:
  1274.  
  1275.   1. command line options: `-O' or `--output-target', or `-F' or
  1276.      `--target'
  1277.  
  1278.   2. the input target (see "`objcopy' and `strip' Input Target" above)
  1279.  
  1280.   3. environment variable `GNUTARGET'
  1281.  
  1282.   4. deduced from the input file
  1283.  
  1284. `nm', `size', and `strings' Target
  1285. ----------------------------------
  1286.  
  1287.    Ways to specify:
  1288.  
  1289.   1. command line option: `--target'
  1290.  
  1291.   2. environment variable `GNUTARGET'
  1292.  
  1293.   3. deduced from the input file
  1294.  
  1295. Linker Input Target
  1296. -------------------
  1297.  
  1298.    Ways to specify:
  1299.  
  1300.   1. command line option: `-b' or `--format' (*note Options:
  1301.      (ld.info)Options.)
  1302.  
  1303.   2. script command `TARGET' (*note Option Commands: (ld.info)Option
  1304.      Commands.)
  1305.  
  1306.   3. environment variable `GNUTARGET' (*note Environment:
  1307.      (ld.info)Environment.)
  1308.  
  1309.   4. the default target of the selected linker emulation (*note Linker
  1310.      Emulation Selection::.)
  1311.  
  1312. Linker Output Target
  1313. --------------------
  1314.  
  1315.    Ways to specify:
  1316.  
  1317.   1. command line option: `-oformat' (*note Options: (ld.info)Options.)
  1318.  
  1319.   2. script command `OUTPUT_FORMAT' (*note Option Commands:
  1320.      (ld.info)Option Commands.)
  1321.  
  1322.   3. the linker input target (see "Linker Input Target" above)
  1323.  
  1324. 
  1325. File: binutils.info,  Node: Architecture Selection,  Next: Linker Emulation Selection,  Prev: Target Selection,  Up: Selecting The Target System
  1326.  
  1327. Architecture selection
  1328. ======================
  1329.  
  1330.    An "architecture" is a type of CPU on which an object file is to
  1331. run.  Its name may contain a colon, separating the name of the
  1332. processor family from the name of the particular CPU.
  1333.  
  1334.    The command to list valid architecture values is `objdump -i' (the
  1335. second column contains the relevant information).
  1336.  
  1337.    Sample values: `m68k:68020', `mips:3000', `sparc'.
  1338.  
  1339. `objdump' Architecture
  1340. ----------------------
  1341.  
  1342.    Ways to specify:
  1343.  
  1344.   1. command line option: `-m' or `--architecture'
  1345.  
  1346.   2. deduced from the input file
  1347.  
  1348. `objcopy', `nm', `size', `strings' Architecture
  1349. -----------------------------------------------
  1350.  
  1351.    Ways to specify:
  1352.  
  1353.   1. deduced from the input file
  1354.  
  1355. Linker Input Architecture
  1356. -------------------------
  1357.  
  1358.    Ways to specify:
  1359.  
  1360.   1. deduced from the input file
  1361.  
  1362. Linker Output Architecture
  1363. --------------------------
  1364.  
  1365.    Ways to specify:
  1366.  
  1367.   1. script command `OUTPUT_ARCH' (*note Option Commands:
  1368.      (ld.info)Option Commands.)
  1369.  
  1370.   2. the default architecture from the linker output target (*note
  1371.      Target Selection::.)
  1372.  
  1373. 
  1374. File: binutils.info,  Node: Linker Emulation Selection,  Prev: Architecture Selection,  Up: Selecting The Target System
  1375.  
  1376. Linker emulation selection
  1377. ==========================
  1378.  
  1379.    A linker "emulation" is a "personality" of the linker, which gives
  1380. the linker default values for the other aspects of the target system.
  1381. In particular, it consists of
  1382.  
  1383.    * the linker script
  1384.  
  1385.    * the target
  1386.  
  1387.    * several "hook" functions that are run at certain stages of the
  1388.      linking process to do special things that some targets require
  1389.  
  1390.    The command to list valid linker emulation values is `ld -V'.
  1391.  
  1392.    Sample values: `hp300bsd', `mipslit', `sun4'.
  1393.  
  1394.    Ways to specify:
  1395.  
  1396.   1. command line option: `-m' (*note Options: (ld.info)Options.)
  1397.  
  1398.   2. environment variable `LDEMULATION'
  1399.  
  1400.   3. compiled-in `DEFAULT_EMULATION' from `Makefile', which comes from
  1401.      `EMUL' in `config/TARGET.mt'
  1402.  
  1403. 
  1404. File: binutils.info,  Node: Index,  Prev: Selecting The Target System,  Up: Top
  1405.  
  1406. Index
  1407. *****
  1408.  
  1409. * Menu:
  1410.  
  1411. * .stab:                                objdump.
  1412. * ar compatibility:                     ar.
  1413. * nm compatibility:                     nm.
  1414. * nm compatibility:                     nm.
  1415. * nm format:                            nm.
  1416. * nm format:                            nm.
  1417. * size display format:                  size.
  1418. * size number format:                   size.
  1419. * all header information, object file:  objdump.
  1420. * ar:                                   ar.
  1421. * architecture:                         objdump.
  1422. * architectures available:              objdump.
  1423. * archive contents:                     ranlib.
  1424. * archive headers:                      objdump.
  1425. * archives:                             ar.
  1426. * c++filt:                              c++filt.
  1427. * collections of files:                 ar.
  1428. * compatibility, ar:                    ar.
  1429. * contents of archive:                  ar cmdline.
  1430. * creating archives:                    ar cmdline.
  1431. * dates in archive:                     ar cmdline.
  1432. * debug symbols:                        objdump.
  1433. * debugging symbols:                    nm.
  1434. * deleting from archive:                ar cmdline.
  1435. * demangling C++ symbols:               c++filt.
  1436. * demangling C++ symbols:               nm.
  1437. * disassembling object code:            objdump.
  1438. * discarding symbols:                   strip.
  1439. * dynamic relocation entries, in object file: objdump.
  1440. * dynamic symbol table entries, printing: objdump.
  1441. * dynamic symbols:                      nm.
  1442. * ELF object file format:               objdump.
  1443. * external symbols:                     nm.
  1444. * external symbols:                     nm.
  1445. * extract from archive:                 ar cmdline.
  1446. * file name:                            nm.
  1447. * header information, all:              objdump.
  1448. * input file name:                      nm.
  1449. * libraries:                            ar.
  1450. * listings strings:                     strings.
  1451. * machine instructions:                 objdump.
  1452. * moving in archive:                    ar cmdline.
  1453. * MRI compatibility, ar:                ar scripts.
  1454. * name duplication in archive:          ar cmdline.
  1455. * name length:                          ar.
  1456. * nm:                                   nm.
  1457. * objdump:                              objdump.
  1458. * object code format:                   objdump.
  1459. * object code format:                   size.
  1460. * object code format:                   nm.
  1461. * object code format:                   strings.
  1462. * object file header:                   objdump.
  1463. * object file information:              objdump.
  1464. * object file sections:                 objdump.
  1465. * object formats available:             objdump.
  1466. * operations on archive:                ar cmdline.
  1467. * printing from archive:                ar cmdline.
  1468. * printing strings:                     strings.
  1469. * quick append to archive:              ar cmdline.
  1470. * radix for section sizes:              size.
  1471. * ranlib:                               ranlib.
  1472. * relative placement in archive:        ar cmdline.
  1473. * relocation entries, in object file:   objdump.
  1474. * removing symbols:                     strip.
  1475. * repeated names in archive:            ar cmdline.
  1476. * replacement in archive:               ar cmdline.
  1477. * scripts, ar:                          ar scripts.
  1478. * section headers:                      objdump.
  1479. * section information:                  objdump.
  1480. * section sizes:                        size.
  1481. * sections, full contents:              objdump.
  1482. * size:                                 size.
  1483. * sorting symbols:                      nm.
  1484. * source file name:                     nm.
  1485. * source filenames for object files:    objdump.
  1486. * stab:                                 objdump.
  1487. * strings:                              strings.
  1488. * strings, printing:                    strings.
  1489. * strip:                                strip.
  1490. * symbol index:                         ranlib.
  1491. * symbol index:                         ar.
  1492. * symbol index, listing:                nm.
  1493. * symbol table entries, printing:       objdump.
  1494. * symbols:                              nm.
  1495. * symbols, discarding:                  strip.
  1496. * undefined symbols:                    nm.
  1497. * Unix compatibility, ar:               ar cmdline.
  1498. * updating an archive:                  ar cmdline.
  1499. * version:                              Top.
  1500. * writing archive index:                ar cmdline.
  1501.  
  1502.  
  1503. 
  1504. Tag Table:
  1505. Node: Top961
  1506. Node: ar1886
  1507. Node: ar cmdline4052
  1508. Node: ar scripts10476
  1509. Node: nm16157
  1510. Node: objcopy20273
  1511. Node: objdump23830
  1512. Node: ranlib29297
  1513. Node: size30031
  1514. Node: strings32698
  1515. Node: strip34512
  1516. Node: c++filt36634
  1517. Node: nlmconv39193
  1518. Node: Selecting The Target System41816
  1519. Node: Target Selection42822
  1520. Node: Architecture Selection45070
  1521. Node: Linker Emulation Selection46302
  1522. Node: Index47180
  1523. 
  1524. End Tag Table
  1525.